<?php
function isloged(){
     $CI = & get_instance();
if($CI->session->userdata('logged_in'))
   {
     $CI = & get_instance();
     $session_data =  $CI->session->userdata('logged_in');
      $data['username'] = $session_data['username'];
      $CI->load->view('projects/create_project', $data);
   }
   else
   {
     //If no session, redirect to login page
     redirect('users/login', 'refresh');
   }
}